// import {constantRouterMap} from '../../router/router.config'
// /**
//  * 动态添加主界面路由，需要缓存
//  * */
// const permission = {
//   state: {
//     routers: constantRouterMap,
//     addRouters: []
//
//   },
//   mutations: {
//     SET_ROUTERS: (state, data) => {
//       console.log(data)
//       state.addRouters = data
//       state.routers = constantRouterMap.concat(data)
//       console.log('-----mutations---SET_ROUTERS----', state.routers)
//     }
//   },
//   actions: {
//     updateAppRouter({commit}, routers) {
//       return new Promise(resolve => {
//         console.log('获取的路由', routers)
//         let routerList = routers.constRoutes
//         commit('SET_ROUTERS', routerList)
//         resolve()
//       })
//     }
//   }
// }
// export default permission
